<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>DataSourceContractTest (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="DataSourceContractTest (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":6,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":6,"i9":10,"i10":10,"i11":6,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.testutil</a></div>
<h2 title="Class DataSourceContractTest" class="title">Class DataSourceContractTest</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.testutil.DataSourceContractTest</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>@RequiresApi(19)
public abstract class <span class="typeNameLabel">DataSourceContractTest</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">A collection of contract tests for <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> implementations.

 <p>Subclasses should only include the logic necessary to construct the DataSource and allow it to
 successfully read data. They shouldn't include any new <code>@Test</code> methods -
 implementation-specific tests should be in a separate class.

 <p>Most implementations should pass all these tests. If necessary, subclasses can disable tests
 by overriding the <code>@Test</code> method with a no-op implementation. It's recommended (but
 not required) to also annotate this <code>@Ignore</code> so that JUnit correclty reports the
 test as skipped/ignored instead of passing.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataSourceContractTest.FakeTransferListener.html" title="class in com.google.android.exoplayer2.testutil">DataSourceContractTest.FakeTransferListener</a></span></code></th>
<td class="colLast">
<div class="block">A <a href="../upstream/TransferListener.html" title="interface in com.google.android.exoplayer2.upstream"><code>TransferListener</code></a> that only keeps track of the transferred bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="DataSourceContractTest.TestResource.html" title="class in com.google.android.exoplayer2.testutil">DataSourceContractTest.TestResource</a></span></code></th>
<td class="colLast">
<div class="block">Information about a resource that can be used to test the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="AdditionalFailureInfo.html" title="class in com.google.android.exoplayer2.testutil">AdditionalFailureInfo</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#additionalFailureInfo">additionalFailureInfo</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">DataSourceContractTest</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected abstract <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createDataSource()">createDataSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates and returns an instance of the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithEndPositionOutOfRange_readsToEnd()">dataSpecWithEndPositionOutOfRange_readsToEnd</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithLength_readExpectedRange()">dataSpecWithLength_readExpectedRange</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithPosition_readUntilEnd()">dataSpecWithPosition_readUntilEnd</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithPositionAndLength_readExpectedRange()">dataSpecWithPositionAndLength_readExpectedRange</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithPositionAtEnd_throwsPositionOutOfRangeException()">dataSpecWithPositionAtEnd_throwsPositionOutOfRangeException</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithPositionAtEndAndLength_throwsPositionOutOfRangeException()">dataSpecWithPositionAtEndAndLength_throwsPositionOutOfRangeException</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException()">dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected abstract <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNotFoundUri()">getNotFoundUri</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> that doesn't resolve.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResponseHeaders_isEmptyWhileNotOpen()">getResponseHeaders_isEmptyWhileNotOpen</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen()">getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected abstract <a href="https://guava.dev/releases/27.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true" title="class or interface in com.google.common.collect" class="externalLink">ImmutableList</a>&lt;<a href="DataSourceContractTest.TestResource.html" title="class in com.google.android.exoplayer2.testutil">DataSourceContractTest.TestResource</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTestResources()">getTestResources</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns <a href="DataSourceContractTest.TestResource.html" title="class in com.google.android.exoplayer2.testutil"><code>DataSourceContractTest.TestResource</code></a> instances.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>protected <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTransferListenerDataSource()">getTransferListenerDataSource</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> that will be included in the <a href="../upstream/TransferListener.html" title="interface in com.google.android.exoplayer2.upstream"><code>TransferListener</code></a> callbacks
 for the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> most recently created by <a href="#createDataSource()"><code>createDataSource()</code></a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUri_resourceNotFound_returnsNullIfNotOpened()">getUri_resourceNotFound_returnsNullIfNotOpened</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getUri_returnsNonNullValueOnlyWhileOpen()">getUri_returnsNonNullValueOnlyWhileOpen</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resourceNotFound()">resourceNotFound</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#resourceNotFound_transferListenerCallbacks()">resourceNotFound_transferListenerCallbacks</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#transferListenerCallbacks()">transferListenerCallbacks</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unboundedDataSpec_readUntilEnd()">unboundedDataSpec_readUntilEnd</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unboundedDataSpecWithGzipFlag_readUntilEnd()">unboundedDataSpecWithGzipFlag_readUntilEnd</a></span>()</code></th>
<td class="colLast">
<div class="block"><a href="../upstream/DataSpec.html#FLAG_ALLOW_GZIP"><code>DataSpec.FLAG_ALLOW_GZIP</code></a> should either be ignored by <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a>
 implementations, or correctly handled (i.e.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unboundedReadsAreIndefinite()">unboundedReadsAreIndefinite</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> will continue reading indefinitely for unbounded <a href="../upstream/DataSpec.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpecs</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="additionalFailureInfo">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>additionalFailureInfo</h4>
<pre>public final&nbsp;<a href="AdditionalFailureInfo.html" title="class in com.google.android.exoplayer2.testutil">AdditionalFailureInfo</a> additionalFailureInfo</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DataSourceContractTest</h4>
<pre>public&nbsp;DataSourceContractTest()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="createDataSource()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createDataSource</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a>&nbsp;createDataSource()
                                        throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<div class="block">Creates and returns an instance of the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getTransferListenerDataSource()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTransferListenerDataSource</h4>
<pre class="methodSignature">@Nullable
protected&nbsp;<a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream">DataSource</a>&nbsp;getTransferListenerDataSource()</pre>
<div class="block">Returns the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> that will be included in the <a href="../upstream/TransferListener.html" title="interface in com.google.android.exoplayer2.upstream"><code>TransferListener</code></a> callbacks
 for the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> most recently created by <a href="#createDataSource()"><code>createDataSource()</code></a>. If it's the
 same <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> then <code>null</code> can be returned.</div>
</li>
</ul>
<a id="unboundedReadsAreIndefinite()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unboundedReadsAreIndefinite</h4>
<pre class="methodSignature">protected&nbsp;boolean&nbsp;unboundedReadsAreIndefinite()</pre>
<div class="block">Returns whether the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> will continue reading indefinitely for unbounded <a href="../upstream/DataSpec.html" title="class in com.google.android.exoplayer2.upstream"><code>DataSpecs</code></a>.</div>
</li>
</ul>
<a id="getTestResources()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTestResources</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="https://guava.dev/releases/27.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true" title="class or interface in com.google.common.collect" class="externalLink">ImmutableList</a>&lt;<a href="DataSourceContractTest.TestResource.html" title="class in com.google.android.exoplayer2.testutil">DataSourceContractTest.TestResource</a>&gt;&nbsp;getTestResources()
                                                                                throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<div class="block">Returns <a href="DataSourceContractTest.TestResource.html" title="class in com.google.android.exoplayer2.testutil"><code>DataSourceContractTest.TestResource</code></a> instances.

 <p>Each resource will be used to exercise the <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> instance, allowing different
 behaviours to be tested.

 <p>If multiple resources are returned, it's recommended to disambiguate them using <a href="DataSourceContractTest.TestResource.Builder.html#setName(java.lang.String)"><code>DataSourceContractTest.TestResource.Builder.setName(String)</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getNotFoundUri()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNotFoundUri</h4>
<pre class="methodSignature">protected abstract&nbsp;<a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top">Uri</a>&nbsp;getNotFoundUri()</pre>
<div class="block">Returns a <a href="https://developer.android.com/reference/android/net/Uri.html" title="class or interface in android.net" class="externalLink" target="_top"><code>Uri</code></a> that doesn't resolve.

 <p>This is used to test how a <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a> handles nonexistent data.</div>
</li>
</ul>
<a id="unboundedDataSpec_readUntilEnd()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unboundedDataSpec_readUntilEnd</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;unboundedDataSpec_readUntilEnd()
                                    throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithPosition_readUntilEnd()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithPosition_readUntilEnd</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithPosition_readUntilEnd()
                                       throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithLength_readExpectedRange()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithLength_readExpectedRange</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithLength_readExpectedRange()
                                          throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithPositionAndLength_readExpectedRange()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithPositionAndLength_readExpectedRange</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithPositionAndLength_readExpectedRange()
                                                     throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithPositionAtEnd_throwsPositionOutOfRangeException()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithPositionAtEnd_throwsPositionOutOfRangeException</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithPositionAtEnd_throwsPositionOutOfRangeException()
                                                                 throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithPositionAtEndAndLength_throwsPositionOutOfRangeException()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithPositionAtEndAndLength_throwsPositionOutOfRangeException</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithPositionAtEndAndLength_throwsPositionOutOfRangeException()
                                                                          throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException()
                                                                      throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="dataSpecWithEndPositionOutOfRange_readsToEnd()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSpecWithEndPositionOutOfRange_readsToEnd</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;dataSpecWithEndPositionOutOfRange_readsToEnd()
                                                  throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="unboundedDataSpecWithGzipFlag_readUntilEnd()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unboundedDataSpecWithGzipFlag_readUntilEnd</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;unboundedDataSpecWithGzipFlag_readUntilEnd()
                                                throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<div class="block"><a href="../upstream/DataSpec.html#FLAG_ALLOW_GZIP"><code>DataSpec.FLAG_ALLOW_GZIP</code></a> should either be ignored by <a href="../upstream/DataSource.html" title="interface in com.google.android.exoplayer2.upstream"><code>DataSource</code></a>
 implementations, or correctly handled (i.e. the data is decompressed before being returned from
 <a href="../upstream/DataReader.html#read(byte%5B%5D,int,int)"><code>DataReader.read(byte[], int, int)</code></a>).</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="resourceNotFound()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceNotFound</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;resourceNotFound()
                      throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="transferListenerCallbacks()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transferListenerCallbacks</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;transferListenerCallbacks()
                               throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="resourceNotFound_transferListenerCallbacks()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>resourceNotFound_transferListenerCallbacks</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;resourceNotFound_transferListenerCallbacks()
                                                throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getUri_returnsNonNullValueOnlyWhileOpen()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUri_returnsNonNullValueOnlyWhileOpen</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;getUri_returnsNonNullValueOnlyWhileOpen()
                                             throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getUri_resourceNotFound_returnsNullIfNotOpened()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUri_resourceNotFound_returnsNullIfNotOpened</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;getUri_resourceNotFound_returnsNullIfNotOpened()
                                                    throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getResponseHeaders_isEmptyWhileNotOpen()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResponseHeaders_isEmptyWhileNotOpen</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;getResponseHeaders_isEmptyWhileNotOpen()
                                            throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
<a id="getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen()
                                                             throws <a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></pre>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://developer.android.com/reference/java/lang/Exception.html" title="class or interface in java.lang" class="externalLink" target="_top">Exception</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
